/** 获取昨日日期字符串 */
export const getYesterdayDateStr = () => {
  const today = new Date();
  const yesterday = new Date(today.setDate(today.getDate() - 1));
  const year = yesterday.getFullYear();
  const month = yesterday.getMonth() + 1;
  const day = yesterday.getDate();
  const yesterdayStr = year + '-' + month > 9 ? month : ('0' + month) + '-' + day > 9 ? day : ('0' + day);
  return yesterdayStr;
};
